from django.urls import re_path
from django.urls import path
from rest_framework.urlpatterns import format_suffix_patterns
from . import views

urlpatterns = [
    # re_path(r'^articles/$', views.article_list),
    # re_path(r'^articles/(?P<pk>[0-9]+)$', views.article_detail),
    re_path(r'^articles/$', views.ArticleList.as_view()),
    re_path(r'^articles/(?P<pk>[0-9]+)$', views.ArticleDetail.as_view()),
    path('api/login/', views.login_view, name='login'),
    path('api/user/info/', views.user_info, name='token'),
    ]

urlpatterns = format_suffix_patterns(urlpatterns)